<extend name="base/Base" />
<block name="Style">
<!-- FooTable Plugin CSS -->
		<link rel="stylesheet" type="text/css" href="__ABSOLUTEADMIN__/vendor/plugins/footable/css/footable.core.min.css">
		<!-- Admin Forms CSS -->
		<link rel="stylesheet" type="text/css" href="__ABSOLUTEADMIN__/assets/admin-tools/admin-forms/css/admin-forms.css">
	
</block>
<block name="Topbar">
 <header id="topbar" class="ph10">
       <div class="topbar-left">
          <ul class="nav nav-list nav-list-topbar pull-left">
            
            <li  class="active">
              <a  href="__APP__/Mall/OtherExpress/Manage.html"   >第三方物流</a>
            </li>
			 <li  >
              <a  href="__APP__/Mall/OtherExpressCompany/Manage.html"   >物流公司</a>
            </li>
			
           
          </ul>
        </div>
	
      </header>
   <header id="topbar" class="ph10">
        <div class="topbar-left">
          <ul class="nav nav-list nav-list-topbar pull-left">
		  <li  >
		  <a href="/Mall/OrderNode/Manage/id/143.html">已签收</a>
		  </li>
			<volist name="nodes" id="nodes">
			<li    >
              <a  href="__APP__/Mall/OtherNode/Manage/id/{$nodes.id}.html"   >{$nodes.name}</a>
            </li>
			</volist>	
           
          </ul>
        </div>
		
	</header>
	
	<div class="modal fade" id="usermyModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
									  <div class="modal-dialog" role="document">
										<div class="modal-content">
										  <div class="modal-header">
											<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
											<h4 class="modal-title" id="myModalLabel">关系管理</h4>
										  </div>
										  <div class="modal-body">
											<div class="form-group">
												<label for="exampleInputEmail1">请输入用户UID</label>
												<input type="text" name="r_uid" id="r_uid" class="form-control"  placeholder="请输入用户UID">
											  </div>
											  
										
											<div class="form-group">
												<label for="exampleInputEmail1">请输入操作类型</label>
												<br>
												<label class="radio-inline">
												  <input type="radio" checked name="r_type" id="r_type" value="1"> 增加关联
												</label>
												<label class="radio-inline">
												  <input type="radio" name="r_type" id="r_type" value="2"> 删除关联
												</label>
												
												
											  </div>
											
											  
											
											
														
														
														
													
												
																
						
										  </div>
										  <div class="modal-footer">
											<button type="button" class="btn btn-default" data-dismiss="modal">关闭订单</button>
											<a href="#" class="btn btn-primary" onclick="relevance()" >确认操作</a>
															<script>
						
							
							function relevance(){  
								var uid = $("#r_uid").val();
								var group = $("#r_group").val();
								var type = $("input[name='r_type']:checked").val();;
							
								if(uid==''){
								
									layer.msg('请输入用户UID');
								
								}else{
								
									
									$.ajax({
										type:'POST',
										url:"__APP__/Admin/User/Relevance.html",
										data:{
											"uid": uid,
											"type": type,
											"group": group,
										
										},
										success:function(data){			
											var info = eval(data)
											if (info.errcode == 0) {
											
												layer.msg(info.errmsg);
												setTimeout(window.location.reload(),3000);
												
											}else{
												layer.msg(info.errmsg);
											}
										},
								
									});	
								
								}
								
								
								 
							}  
							</script>
										  </div>
										</div>
									  </div>
									</div>
	
				
</block>
<block name="Content">
	<!-- begin: .tray-center -->
        <div class="tray tray-center">

						
         	<script>
						
					function notice(msg){  
						layer.msg(msg);
					}	
							
							
							</script>
          <!-- recent orders table -->
          <div class="panel">
            <div class="panel-menu p12 admin-form theme-primary">
              <div class="row">
			  <div class="col-md-6">
                  <label class="field select">
                    <select id="now_status" >
					
					<option value="" >全部物流节点</option>
					<volist name="nodess" id="nodess">
					  <option value="{$nodess.id}" >{$nodess.name}</option>
					</volist>	
					
                   
                      
                     
                    </select>
                    <i class="arrow double"></i>
                  </label>
                </div>
                <div class="col-md-3">
                  <label class="field select">
                    <select id="status" name="filter-category" >
                   
					  
						<option value="0" selected >全部订单状态</option>
						  
						 
							<option value ="4" >待发货订单</option>
							<option value ="5" >已发货订单</option>
						
							<option value ="6" >已完成订单</option>
						<option value ="7" >待退款订单</option>
						<option value ="8" >已退款订单</option>
					  
					
                    </select>
                    <i class="arrow"></i>
                  </label>
                </div>
				
				<!-- <div class="col-md-2">
                  <label class="field select">
                    <select id="partner_id" name="bulk-action">
					
				   <option value="0" >全部订单类型</option>
					 <option value="1" >官方订单</option>
                      <option value="2">合作伙伴订单</option>
                      
                    
                      
                     
                    </select>
                    <i class="arrow double"></i>
                  </label>
                </div> -->
				
                <div class="col-md-3">
                  <label class="field select">
                    <select id="pay_type" name="bulk-action">
					
				   <option value="0" >全部支付方式</option>
				  <option value="1" >微信支付</option>
                      <option value="2">储值支付</option>
                      <option value="4">货到付款</option>
			
                    
                      
                     
                    </select>
                    <i class="arrow double"></i>
                  </label>
                </div>
				
              </div>
            </div>
            <div class="panel-body pn" id="batchstatus">
			

              <div class="table-responsive">
                <table class="table footable"  data-filter="#fooFilter"  data-page-navigation=".pagination" data-page-size="100" >
                  <thead>
                     <tr class="bg-light"> 
					 
					<th style="width:5%">批量</th>
					<th >下单时间</th>
                    
                     <th >订单号</th>
                     <th >用户</th>
					
                     <th>金额</th>
                     <th >支付</th>
                     <th >送货</th>
                    
                      <th >操作</th>							
                      
                    </tr>
                  </thead>
                  <tbody>
				  <volist name="list" id="list">
                    <tr>
						<td class="text-center">
					
						<center>
						<label class="option block mn">
						  <input type="checkbox" id="batch" name="batch" value="{$list.id}">
						
						</label>
						</center>
										
														
														
													  </td>
						 <td class="">{$list.time|date="m-d H:i",###}</td>
						
						<td class="">{$list.order_id}</td>
						<td class="">
						<div class="row">
							  <div class="col-md-3" >
                        <img class="img-responsive mw35 ib" title="user" src="{$list.n_img}">
						</div>
						  <div class="col-md-9" >	{$list.nickname}<br>UID:{$list.uid}</div>
						</div>
					
                      </td>
					  
						<td class="">￥{$list.money}元</td>
						<td class="">
						 <if condition="$list.pay_type eq 1"> 
						<span style="color:green"><b>微信</b></span>
						<elseif condition="$list.pay_type eq 2"/>
						<span style="color:green"><b>储值</b></span>
						<elseif condition="$list.pay_type eq 4"/>
						<span style="color:red"><b>到付</b></span>
						<else />
						  
						</if>
						</td>
						<td class="">
						方式：<if condition="$list.express_type eq 0"> 
						<span style="color:blue"><b>未分配配送方式</b></span>
						<elseif condition="$list.express_type eq 1"/>
						<span style="color:green"><b>自提点自提</b></span>
						<elseif condition="$list.express_type eq 2"/>
						<span style="color:green"><b>自有物流配送</b></span>
						<elseif condition="$list.express_type eq 3"/>
						<span style="color:red"><b>第三方物流配送</b></span>
						<else />
						  
						</if>
						<br>
						联系：{$list.name} {$list.tel}<br>
						地址：{$list.address}<br>
						当前：
						<if condition="$list.now_status neq 0"> 
						 <span style="color:green"><b>{$list.now_status_name}</b></span>	<br>
						<else />
						 没有物流信息<br>
						</if>
						留言：{$list.remark}
						
						 
						
						</td>
						
						
					
                       <td>
					  
						
						
						
							<div class="btn-group text-right">
						
						
						<if condition="$list.status eq 7"> 
						<button type="button" class="btn btn-danger br2 btn-xs fs12 dropdown-toggle" data-toggle="dropdown" aria-expanded="false">待退款
						
						<elseif condition="$list.status eq 3"/>
						<button type="button" class="btn btn-warning br2 btn-xs fs12 dropdown-toggle" data-toggle="dropdown" aria-expanded="false">待确认
						
						<elseif condition="$list.status eq 4"/>
						<button type="button" class="btn btn-success br2 btn-xs fs12 dropdown-toggle" data-toggle="dropdown" aria-expanded="false">待发货
						
						<elseif condition="$list.status eq 5"/>
						<button type="button" class="btn btn-primary br2 btn-xs fs12 dropdown-toggle" data-toggle="dropdown" aria-expanded="false">已发货
						
					
						<elseif condition="$list.status eq 6"/>
						<button type="button" class="btn btn-info br2 btn-xs fs12 dropdown-toggle" data-toggle="dropdown" aria-expanded="false">已完成
						
						
						
						<elseif condition="$list.status eq 8"/>
						<button type="button" class="btn btn- br2 btn-xs fs12 dropdown-toggle" data-toggle="dropdown" aria-expanded="false">已退款
						
						<elseif condition="$list.status eq 1"/>
						<button type="button" class="btn btn- br2 btn-xs fs12 dropdown-toggle" data-toggle="dropdown" aria-expanded="false">待支付
						
						<elseif condition="$list.status eq 9"/>
						<button type="button" class="btn btn- br2 btn-xs fs12 dropdown-toggle" data-toggle="dropdown" aria-expanded="false">已关闭
						
						<else /> 
						
						</if>
                          

						   <span class="caret ml5"></span>
                          </button>
                          <ul class="dropdown-menu" role="menu">
							
							<li >
                              <a  href="__APP__/Mall/Goods/Edit/id/{$list.id}.html" target="_blank" >编辑</a>
                            </li>
                          
                            
								
								
						    <li class="divider"></li>
							 <li >
                              <a  href="__APP__/Mall/Goods/Detail/id/{$list.id}.html" target="_blank" >查看</a>
                            </li>
						
                         
                          
							
                           
                          </ul>
                        </div>
						
						</td>
                          
							
                           
                      
                    </tr>
                </volist>
				</tbody>
				 <tfoot class="footer-menu">
				<tr>
				  <td colspan="12">
					<nav class="text-right">
					  <ul class="pagination hide-if-no-paging"></ul>
					</nav>
				  </td>
				</tr>
			  </tfoot>
                </table>
              </div>
            </div>
          </div>

		  
				<div class="col-md-12 digg">
				 <br>
					<center>
				 {$pages}
				</center>
				
			  </div>
			  
        </div>
        <!-- end: .tray-center -->

        <!-- begin: .tray-right -->
        <aside class="tray tray-right tray290" data-tray-height="match">
		<form action="__SELF__" method="get">
          <!-- menu quick links -->
          <div class="admin-form">

            <h4>搜索订单</h4>
			提示：<span style="color:red;">为空时则不作为搜索条件</span>

            <hr class="short">
			
		
			
			<div class="section mb15">
              <label for="order-id" class="field prepend-icon">
                <input type="text" name="uid" class="gui-input" placeholder="请输入用户UID" value="{$uid}">
                <label for="order-id" class="field-icon">
                  <i class="fa fa-user"></i>
                </label>
              </label>
            </div>
			
			<div class="section mb15">
              <label for="order-id" class="field prepend-icon">
                <input type="text" name="tel"  class="gui-input" placeholder="请输入手机号" value="{$tel}">
                <label for="order-id" class="field-icon">
                  <i class="fa fa-phone"></i>
                </label>
              </label>
            </div>
			
			<div class="section mb15">
              <label for="order-id" class="field prepend-icon">
                <input type="text" name="order_id" class="gui-input" placeholder="请输入订单号" value="{$order_id}">
                <label for="order-id" class="field-icon">
                  <i class="fa fa-tag"></i>
                </label>
              </label>
            </div>
			
			
			
		
			<div class="section mb15">
              <label class="field select">
                <select  name="now_status">
					
				   <option value="" >全部物流节点</option>
					  
                      <volist name="nodesss" id="nodesss">
					  <option value="{$nodesss.id}" >{$nodesss.name}</option>
					</volist>	
                      
                     
                    </select>
              
                <i class="arrow double"></i>
              </label>
            </div>
			
			<div class="section mb15">
              <label class="field select">
                <select  name="status" >
                   
					  
					 <option value="0" selected >全部订单状态</option>
						  
						<option value ="4" >待发货订单</option>
						<option value ="5" >已发货订单</option>
						
						<option value ="6" >已完成订单</option>
						
					  <option value ="7" >待退款订单</option>
						<option value ="8" >已退款订单</option>
					
                    </select>
                
                <i class="arrow double"></i>
              </label>
            </div>
			

			
			<div class="section mb15">
              <label class="field select">
                <select  name="pay_type">
					
				   <option value="0" >全部支付方式</option>
				  <option value="1" >微信支付</option>
                      <option value="2">储值支付</option>
                      <option value="4">货到付款</option>
			
                    
                      
                     
                    </select>
                
                <i class="arrow double"></i>
              </label>
            </div>
			
			
		
			

			
            <hr class="short">

            <div class="section">
                <button class="btn btn-default btn-sm ph25" type="submit" style="width:100%;">搜索订单</button>
               
            </div>

          </div>
		</form>
		<br>
		<br>
		<br>
        </aside>
        <!-- end: .tray-right -->

   

</block>
<block name="Script">
	
  <!-- FooTable Plugin -->
  <script src="__ABSOLUTEADMIN__/vendor/plugins/footable/js/footable.all.min.js"></script>
   <!-- FooTable Addon -->
  <script src="__ABSOLUTEADMIN__/vendor/plugins/footable/js/footable.filter.min.js"></script>

 <script type="text/javascript">
 
	
		function unSelect(){
				
		  $("input[id='batch']").each(function(){
		   $(this).prop("checked",false);
		  });  
		  
	
		}
		
		function selectAll(){
				
		 $("input[id='batch']").each(function(){
		   $(this).prop("checked",true);
		  });  
		  
		}
		
		function reverse(){
				
		 $("input[id='batch']").each(function(){
			$(this).prop("checked",!this.checked);   
		  
			})
		}
		
			
				
				
			
		
				function status(status){
				
				
						 var id=$('input[id="batch"]:checked').map(function(){return this.value}).get().join();
						
						layer.confirm('你确定要这样做么？', {
						  btn: ['确定','取消'] //按钮
						}, function(){
						  
						  $.ajax({
								type:'POST',
								url:"__APP__/Mall/Goods/Delete.html",
								data:{
									
									"id": id,
									"status": status,
									
								},
								success:function(data){			
										var info = eval(data)
										if (info.errcode == 0) {
										
											layer.msg(info.errmsg);
											setTimeout(window.location.reload(),3000);
											
										}else{
											layer.msg(info.errmsg);
										}
								},
								error:function(){
									layer.msg('系统繁忙,请稍候重试！');
								}
							
							});	 
						  
						}, function(){
						  
						  
						});

					
				
				}
				
				
					$("#now_status").change(function(){
						  	var now_status = $("#now_status").val();
							
							
							var url = '__APP__/Mall/OtherExpress/Manage.html';
							url = url+'?now_status='+now_status;
						
							 self.location=url;
							
						
						
					});
					
					
						$("#status").change(function(){
						  	var status = $("#status").val();
							
							
							var url = '__APP__/Mall/OtherExpress/Manage.html';
							url = url+'?status='+status;
						
							 self.location=url;
							
						
						
					});
					
					$("#pay_type").change(function(){
						  	var pay_type = $("#pay_type").val();
							
							
							var url = '__APP__/Mall/OtherExpress/Manage.html';
							url = url+'?pay_type='+pay_type;
						
							 self.location=url;
							
						
						
					});
					
					$("#express_type").change(function(){
						  	var express_type = $("#express_type").val();
							
							
							var url = '__APP__/Mall/Order/Manage.html';
							url = url+'?express_type='+express_type;
						
							 self.location=url;
							
						
						
					});
						
					
  jQuery(document).ready(function() {

 

    // Init FooTable Examples
    $('.footable').footable();


  });
  </script>
</block>